package com.simplemall.micro.serv.page.client;

import java.util.List;

import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import com.simplemall.micro.serv.common.bean.telbook.TelBook;
import com.simplemall.micro.serv.common.bean.telbook.TelBookInfo;
import com.simplemall.micro.serv.page.client.hystrix.OrderFeignClientHystrix;
import com.simplemall.micro.serv.page.client.hystrix.TelBookFeignClientHystrix;

@FeignClient(name = "TELBOOK-SERVICE" ,fallback = TelBookFeignClientHystrix.class)
public interface TelBookFeignClient {

	@RequestMapping(value = "/telBook/telBookList/{userid}", method = RequestMethod.POST)
	public List<TelBook> getTelBookById(@PathVariable("userid") String userid);
	
	@RequestMapping(value = "/telBook/telBookCreate", method = RequestMethod.POST)
	public String createTelBook(@RequestParam("bookName") String bookName, @RequestParam("remark") String remark, @RequestParam("userid") String userid);
	
	@RequestMapping(value = "/telBookInfo/telBookInfoList/{telBookId}", method = RequestMethod.POST)
	public List<TelBookInfo> telBookInfo(@PathVariable("telBookId") String telBookId);
	
	@RequestMapping(value = "/telBookInfo/telBookInfoList/insert", method = RequestMethod.POST)
	public String insertTelBookInfo(@RequestParam("telBookStr") String telBookStr);
	
	@RequestMapping(value = "getTelBookInfo/{telBookId}/{fuserid}", method = RequestMethod.POST)
	public TelBookInfo getTelBookInfoByFuserid(@PathVariable("telBookId") String telBookId, @PathVariable("fuserid") String fuserid);
	
	@RequestMapping(value = "updateTelBookInfo", method = RequestMethod.POST)
	public String updateTelBookInfo(@RequestParam("telBookInfoStr") String telBookInfoStr);
	
	@RequestMapping(value = "deleteTelBookInfo/{telBookInfoId}", method = RequestMethod.POST)
	public String deleteTelBookInfo(@PathVariable("telBookInfoId") String id);
	
}
